package com.hlw.service.impl;

import java.util.List;

import javax.annotation.Resource;

import com.hlw.dao.RoleMapper;
import com.hlw.entity.Role;
import com.hlw.service.IRoleService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Mht
 * @since 2020-05-17
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService {
    @Resource
	RoleMapper roleMapper;
	@Override
	public List<Role> selectAll() {
		// TODO Auto-generated method stub
		return roleMapper.findAll();
	}
	@Override
	public Integer findRoleByUid(Integer uid) {
		return roleMapper.findRoleByUid(uid);
		
	}
	@Override
	public Integer inserRoleByRidOrUid(Integer uid, Integer rid) {
		// TODO Auto-generated method stub
		return roleMapper.inserRole(uid, rid);
	}
	@Override
	public Integer deleteRoleByUid(Integer uid) {
		
		return roleMapper.deleteRoleByUid(uid);
		
	}


}
